<template>
	<view>
		<block v-for=" (item,i) in list" :key="i">
			<view class="item" @tap="activityDetail(item.id)">
				<view class="info">
					<image class="cover_img" :src="item.image" mode="aspectFill"></image>
					<view class="">
						<view class="title">{{item.storeName}}</view>
						<view class="time">时间：{{item.activityStartTime}}</view>
						<view class="other_info">
							<!-- <view class="tags" v-for="(tog,i) in item.topic">
									<view class="">{{tog}}</view>
								</view> -->
							<view class="tags">
								<view class="">{{item.topic}}</view>
							</view>
							<view class="price">
								<text>￥</text>
								<text class="pirce_val">{{item.price}}</text>
							</view>
						</view>
					</view>
				</view>
				<view class="address">
					<uni-icons type="location-filled" color="#999999" size="16"></uni-icons>
					<text>{{item.address}}</text>
				</view>
			</view>
		</block>
		<view style="text-align: center;" v-if="list.length==0">
			<image style="width: 200rpx;height: 200rpx;" src="../../static/nodata.png"></image>
			<view style="color: #999;text-align: center;">暂无数据</view>
		</view>
		<view style="text-align: center;color: #999;" v-if="noMoreData&&list.length!=0">
			没有更多啦
		</view>
	</view>
</template>

<script>
	export default {
		name: "productList",
		props: {
			list: {
				type: Array,
				default: () => {
					return []
				}
			},
			noMoreData: {
				type: Boolean,
				default: false,
			},
			// 距离顶部高度
			// top: {
			// 	type: String || Number,
			// 	default: 120
			// },
		},
		data() {
			return {

			};
		},
		methods: {
			activityDetail(id) {
				this.$to(`/pages/index/gameDetail/gameDetail?id=${id}`)
			}
		},
	}
</script>

<style lang="scss" scoped>
	.item {
		width: 100%;
		padding: 20rpx 26rpx 26rpx;
		box-sizing: border-box;
		background-color: #fff;
		border-radius: 20rpx;
		margin-bottom: 20rpx;
	
		.info {
			display: flex;
			align-items: flex-start;
			padding-bottom: 14rpx;
			border-bottom: 1rpx dashed #F0F0F0;
			margin-bottom: 26rpx;
	
			.cover_img {
				width: 200rpx;
				height: 160rpx;
				border-radius: 14rpx;
				margin-right: 16rpx;
			}
	
			>view {
				flex: 1;
	
				.title {
					width: 420rpx;
					font-size: 30rpx;
					line-height: 30rpx;
					font-weight: bold;
					color: #1A1A1A;
					overflow: hidden;
					white-space: nowrap;
					text-overflow: ellipsis;
				}
	
				.time {
					font-size: 24rpx;
					line-height: 24rpx;
					color: #999999;
					padding: 14rpx 0 22rpx;
				}
	
				.other_info {
					display: flex;
					justify-content: space-between;
	
					.tags {
						display: flex;
						align-items: center;
	
						>view {
							font-size: 22rpx;
							line-height: 22rpx;
							padding: 8rpx 12rpx;
							color: #FF8F01;
							background-color: #FFF2E2;
						}
	
						>view:not(:last-child) {
							margin-right: 20rpx;
						}
					}
	
					.price {
						font-size: 24rpx;
						font-weight: bold;
						color: #FF0404;
	
						.pirce_val {
							font-size: 34rpx;
							color: #FF0000;
						}
					}
				}
			}
		}
	
		.address {
			display: flex;
			align-items: center;
			font-size: 24rpx;
			color: #999999;
			line-height: 24rpx;
		}
	}
</style>